<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="../../commons/taglibs.jsp"%>
<!-- 左侧侧边导航开始 -->
<div class="layui-side layui-side-bg layui-larry-side" id="larry-side">
    <div class="layui-side-scroll" id="larry-nav-side" lay-filter="side">
        <div class="user-photo">
            <a class="img" title="我的头像">
                <img src="${layuiBase }/admin/images/user.jpg" class="userimg1">
            </a>
            <p>
                你好！
                <c:choose>
                    <c:when test="${user.realname!=null && user.realname!='' }">
                    ${user.realname }
                    </c:when>
                    <c:otherwise>
                    ${user.loginname }
                    </c:otherwise>
                </c:choose>
                , 欢迎登录
            </p>
        </div>
        <!-- 左侧菜单 -->
        <ul class="layui-nav layui-nav-tree">
            <li class="layui-nav-item layui-this">
                <a href="javascript:;" data-url="main.html">
                    <i class="iconfont icon-home1" data-icon='icon-home1'></i>
                    <span>后台首页</span>
                </a>
            </li>
            <c:forEach var="firstLevel" items="${UserMenu.children }" varStatus="s">
                <li class="layui-nav-item">
                    <a href="javascript:;">
                        <i class="iconfont ${firstLevel.menuIcon }"></i>
                        <span> ${firstLevel.name }</span>
                        <em class="layui-nav-more"></em>
                    </a>
                    <dl class="layui-nav-child">
                        <c:forEach var="secondLevel" items="${firstLevel.children }">
                            <dd>
                                <a href="javascript:;" data-url="${secondLevel.url }">
                                    <i class="iconfont ${secondLevel.menuIcon }"></i>
                                    <span>${secondLevel.name }</span>
                                </a>
                            </dd>
                        </c:forEach>
                    </dl>
                </li>
            </c:forEach>
        </ul>
    </div>
</div>